#include<stdio.h>
#include<unistd.h>
#include<pthread.h>


void* pthread_start(void* arg){
   pthread_detach(pthread_self());
    while(1){
        printf("i am work\n");
        sleep(1);
    }
}
int main(){
    int i=0;
    for(i;i<4;i++){

    pthread_t tid;
   int ret = pthread_create(&tid,NULL,pthread_start,NULL);
   if(ret<0){
       perror("pthread_create");
       return 0;
   }
    }
   while(1){
       printf("i am main\n");
       sleep(1);
   }
 //   pthread_join(tid,NULL);
    return 0;
}
